package tree.binarytree2;

public class Test {
    public static void main(String[] args) {
//        test1();
//        test2();
        test3();
    }

    private static void test3() {
        BinaryTree tree = new BinaryTree();
        IBinaryTree.TreeNode root = tree.createTree();
        tree.preOrderNor(root);
        System.out.println();
        tree.inOrderNor(root);
        System.out.println();
        tree.postOrderNor(root);
        System.out.println();

    }

    private static void test2() {
        String str = "1(2(4()()))()))(3()())))";
        String replace = str.replace("()", "");
        System.out.println(replace);
    }

    private static void test1() {
        BinaryTree tree = new BinaryTree();
        IBinaryTree.TreeNode root = tree.createTree();
        tree.levelOrder(root);
        System.out.println(tree.isCompleteTree(root));
        tree.size(root);
        System.out.println(tree.size);
        tree.getLeafNodeCount1(root);
        System.out.println(tree.getLeafCount);
        System.out.println(tree.getKLevelNodeCount(root, 1));
        System.out.println(tree.getHeight(root));
        tree.preOrder(root);
        System.out.println();
        tree.inOrder(root);
        System.out.println();
        tree.postOrder(root);
        System.out.println();
    }
}
